﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace LaserHarp
{
    //The EasyLase class prices access to the laser control methods in the EasyLase API

    class EasyLase
    {
        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseGetCardNum();

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseWriteFrame(ref int CardNumber, byte[,] Datapointer, int Bytecount, int Speed);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseStop(ref int CardNumber);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseWriteDMX(ref int CardNumber, ref byte Datapointer);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseGetDMX(ref int CardNumber, ref byte Datapointer);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseWriteTTL(ref int CardNumber, int TTLValue);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseGetLastError(ref int CardNumber);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseGetStatus(ref int CardNumber);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseGetDebugInfo(ref int CardNumber, ref byte Datapointer, int count);

        [DllImport("Jmlaser.dll", SetLastError = true)]
        internal static extern int EasyLaseClose();

    }
}
